<template>
	<view>
		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">详情</block>
		</cu-custom>

		<view class="cu-list menu-avatar comment solids-top top-xxl">
			
			<view class="cu-item" v-for="(item,index) in list" :key="index">
				<view class="cu-avatar bg-olive text-white round">{{item.username.substr(1,1)}}</view>
				<view class="content">
					<view class="text-gray text-abc cuIcon-friendaddfill">{{item.username}}</view>
					
					<view class="text-gray text-content text-df">
						{{item.content}}
					</view>
					<view class="text-sm">备注：{{item.remark}}</view>	
					<view class="margin-top-sm flex justify-between">
						<view class="text-gray text-df">{{item.work_date}}</view>
						<view class="margin-right-xs">
							<text class="cuIcon-moneybagfill text-red text-sm">{{item.money}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				personnel_id:'',
				nav:''
			}
		},
		onLoad:function(res){
			this.personnel_id = res.id;
			this.nav = res.nav;
		},
		onShow() {
			this.detail();
		},
		methods: {
			detail: async function(){
				let result = await this.$api.sheetdetail({
					id:this.personnel_id,
					nav:this.nav
				});
				if(result.code == 1){
					this.list = result.data
				}else{
					this.list = null
				}
			}
		}
	}
</script>

<style>
</style>
